package com.jason.java.lib;

/**
 * Description:Test2
 *
 * @author jason
 * @create 2020/9/15 16:26
 */
public class Test2 {

  public static void main(String[] args) {
    boolean a = true;
    if(a = false) {
      System.out.println("true");
    }else {
      System.out.println("false");
    }


    int x = 3;
    int y = 5;
    if(x++ > 3 & ++y > 5){
      x++;
    }
    System.out.println("x = "+x+", y= "+y);

    int a1 = 5;//定义一个变量；
    boolean b1 = (a1<4)&&(a1++<10);
    System.out.println("使用短路逻辑运算符的结果为"+b1);
    System.out.println("a的结果为"+ a1);
    boolean b2 = (a1<4)&(a1++<10);
    System.out.println("使用短路逻辑运算符的结果为"+b2);
    System.out.println("a的结果为"+ a1);

    int p = 8;
    System.out.println("p的初始值="+p);
    add(p);
    System.out.println("p的最终值="+p);
  }


  public static void add(int p) {
    p +=5;
    System.out.println("p = "+p);
  }
}
